<!DOCTYPE html>
<html>
<head>
    <title>退款申请
</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-select  v-model="q.merchantId" placeholder="商户名称">
                        <i-option v-for="item in merchants" :value="item.merchantId">{{ item.merchantName }}</i-option>
                    </i-select>
                </i-col>
                <i-col span="2">
                    <i-input v-model="q.phone" @on-enter="query" placeholder="手机号"/>
                </i-col>
                <i-col span="2">
                    <i-input v-model="q.orderno" @on-enter="query" placeholder="订单号"/>
                </i-col>
                <i-col span="2">
                    <i-select v-model="q.statu" placeholder="状态">
                        <i-option :value="1">申请中</i-option>
                        <i-option :value="2">通过</i-option>
                        <i-option :value="3">完成</i-option>
                    </i-select>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("orderdrawback:info"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;查看</i-button>
                #end
                #if($shiro.hasPermission("orderdrawback:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("orderdrawback:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("orderdrawback:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="tOrderDrawback" :rules="ruleValidate" :label-width="80">
            <Form-item label="订单编号" prop="orderNo">
                <i-input v-model="tOrderDrawback.orderNo" placeholder="订单编号"/>
            </Form-item>
            <Form-item label="用户编号" prop="uid">
                <i-input v-model="tOrderDrawback.uid" placeholder="用户编号"/>
            </Form-item>
            <Form-item label="手机号" prop="phone">
                <i-input v-model="tOrderDrawback.phone" placeholder="手机号"/>
            </Form-item>
            <Form-item label="原因" prop="cause">
                <i-input v-model="tOrderDrawback.cause" placeholder="原因"/>
            </Form-item>
            <Form-item label="商品编号" prop="proId">
                <i-input v-model="tOrderDrawback.proId" placeholder="商品编号"/>
            </Form-item>
            <Form-item label="商品状态" prop="proStatus">
                <i-input v-model="tOrderDrawback.proStatus" placeholder="商品状态"/>
            </Form-item>
            <Form-item label="状态名称" prop="proStatusName">
                <i-input v-model="tOrderDrawback.proStatusName" placeholder="状态名称"/>
            </Form-item>
            <Form-item label="金额" prop="amount">
                <i-input v-model="tOrderDrawback.amount" placeholder="金额"/>
            </Form-item>
            <Form-item label="退款金额" prop="backAmount">
                <i-input v-model="tOrderDrawback.backAmount" placeholder="退款金额"/>
            </Form-item>
            <Form-item label="说明" prop="explain">
                <i-input v-model="tOrderDrawback.explain" placeholder="说明"/>
            </Form-item>
            <Form-item label="凭证" prop="certificates">
                <template v-for="item in certificates">
                    <img :src="item" width="300px" style="display: inline ; margin-left: 30px" >
                </template>
            </Form-item>
            <Form-item label="状态" prop="statu">
                <Radio-group v-model="tOrderDrawback.statu" id="status">
                    <Radio label="1">
                        <span>申请中</span>
                    </Radio>
                    <Radio label="2">
                        <span>通过</span>
                    </Radio>
                    <Radio label="3">
                        <span>完成</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="类型" prop="type">
                <i-input v-model="tOrderDrawback.type" placeholder="类型"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>

<script src="${rc.contextPath}/js/order/orderdrawback.js?_${date.systemTime}"></script>
</body>
</html>